//package com.gugee.tiktok.data.consumer.blogger.listener;
//
//import com.linewell.license.generator.common.msg.TaskMessage;
//import org.apache.kafka.clients.consumer.ConsumerRecord;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.kafka.support.Acknowledgment;
//
///**
// *
// * @author luolifeng
// * Date  2020/10/04
// */
//
//public class MyOnlinePromptlyListener {
//    protected final Logger logger = LoggerFactory.getLogger(this.getClass());
//
////    @KafkaListener(topics = {"${kafka.topics.online.promptly}"},containerFactory = "factoryAck")
//    public void listen(ConsumerRecord<?, ?> record, Acknowledgment ack) {
//        try {
//            TaskMessage taskMessage=(TaskMessage)record.value();
//            String name = Thread.currentThread().getName();
//            System.out.println(name+"|"+String.format(
//                    "主题：%s，分区：%d，偏移量：%d，key：%s，value：%s",
//                    record.topic(),record.partition(),record.offset(),
//                    record.key(),record.value()));
////            logger.info("MyOnlinePromptlyListener消息的key: {} value:{} taskType:{} " , record.key(),taskMessage,taskMessage.getTaskType().getDesc());
//            //todo 开始你的表演
//        } finally {
//
//            ack.acknowledge();
//            logger.info("MyOnlinePromptlyListener消息确认完毕！key={}",record.key());
//        }
//
//    }
//}
